package com.filepublic.demo.server.config;

import job.cores.ToOtherLangCore;
import job.interpreter.TsInterpreter;
import job.scanner.DefaultClassScanner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

@Configuration
public class ObjectChangeConfig {

    @Bean
    public ToOtherLangCore build() throws Exception {
        ToOtherLangCore toOtherLangCore = new ToOtherLangCore();
        toOtherLangCore.setDefaultClassScanner(new DefaultClassScanner("com/filepublic/demo/pojo/vo"));
        toOtherLangCore.setLanguageInterpreter("ts",new TsInterpreter());
        toOtherLangCore.core();
        return toOtherLangCore;
    }
}
